import 'package:fish_redux/fish_redux.dart';

class StudentState implements Cloneable<StudentState> {
  String id;
  String name;
  String sexcn;
  String mobile;
  String level;
  String headImage;
  String ctime;

  StudentState(
      {this.id,
      this.name,
      this.sexcn,
      this.mobile,
      this.level,
      this.headImage,
      this.ctime});

  factory StudentState.fromJson(Map<String, dynamic> json) {
    return StudentState(
        id: json['id'],
        sexcn: json['sexcn'],
        name: json['name'],
        mobile: json['mobile'],
        level: json['level'],
        headImage: json['headImage'],
        ctime: json['ctime'] ?? '');
  }

  @override
  StudentState clone() {
    return StudentState()
      ..id = id
      ..name = name
      ..sexcn = sexcn
      ..mobile = mobile
      ..headImage = headImage
      ..ctime = ctime
      ..level = level;
  }

  @override
  String toString() {
    return 'StudentState{title: $name}';
  }
}
